<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第二题</title>
</head>

<body>
    <script>
        function GetPenson(uname, age) {
            this.uname = uname
            this.age = age
        }
        const a = new GetPenson('小郭', 18)
        const b = new GetPenson('小殷', 28)
        const c = new GetPenson('李指导', 16)
        const d = new GetPenson('小邹', 16)
        let arr = [a, b, c, d]
        const arr1 = arr.filter((item) => item.age < 20)
        console.log(arr1)
    </script>
</body>

</html>